<template>
	<view class="con">
		<view class="big-every" v-for="(item,index) in orderList.data" :key="index">
			<view class="top" v-for='(ite,ind) in item.item' :key="ind">
				<view class="img">
					<!-- {{item}} -->
					<image :src="ite.goods_image" alt="">
				</view>
				<view class="conent">
					<view class="left">
						<p>{{ite.goods_title}}</p>
						<span>{{ite.goods_sku_text||''}}</span>
					</view>
					<view class="right">
						<p>¥{{ite.goods_price}}</p>
						<span>x{{ite.goods_num}}</span>
					</view>
				</view>
				
			</view>
			<view class="footer">
				<text>实付款¥{{item.goods_amount}}</text>
			</view>
			<view class="bottom">
				<div class="left" v-if="current1=='0'&&item.status_name">{{item.status_name}}</div>
				<div class="left" v-show="current1=='1'">修改地址</div>
				<div class="left" v-if="current1=='3'" >申请退款</div>
				<div class="left" v-if="current1=='2'"  @click='drawback(item)'>申请退款</div>
				<div class="right" v-if="current1=='2'">提醒发货</div>
				<div class="right" v-if="current1=='3'">确认收货</div> 
				<div class="right"  v-if="current1=='1'">去付款</div>
				<div class="right"  v-if="current1=='0'">删除</div>
				<!--
				<div class="right">提醒发货</div> -->
			</view>
		</view>
	</view>
</template>

<script>
export default {
	props:['orderList','current1'],
	data() {
		return {
		};
	},
	onLoad() {
	},
	mounted() {
		console.log(this.orderList,'999');
	},
	methods: {
		drawback(item){
			let list
			for(let i in item.item){
				list={
					id: item.id,
					order_item_id:item.item[i].id
				}
			}
			this.$emit('drawback',list)
		}
	}
};
</script>

<style lang="scss" scoped>
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}
.con {
	padding: 0 16rpx;
	.big-every{
		width: 100%;
		min-height: 342rpx;
		background: #FFFFFF;
		box-shadow: 0rpx 8rpx 36rpx 0rpx rgba(188,188,188,0.25);
		border-radius: 16rpx 16rpx 16rpx 16rpx;
		padding: 32rpx;
		position: relative;
		margin-top: 18rpx;
		.top{
			display: flex;
			min-height: 200rpx;
			.img{
				width: 160rpx;
				height: 160rpx;
				image{
					width: 100%;
					height: 100%;
				}
			}
			.conent{
				position: relative;
				margin-top:32rpx ;
				margin-left: 16rpx;
				.left{
					width: 316rpx;
					p{
						width: 316rpx;
						font-size: 32rpx;
						font-family: Source Han Sans SC-Medium, Source Han Sans SC;
						font-weight: 500;
						color: #001B0A;
						white-space: nowrap;
						overflow: hidden;
						text-overflow: ellipsis;
					}
					span{
						font-size: 24rpx;
						font-family: Source Han Sans SC-Regular, Source Han Sans SC;
						font-weight: 400;
						color: #AAAAAA;
					}
				}
				.right{
					position: absolute;
					top: -30rpx;
					right: -90rpx;
					
					p{
						width: 90rpx;
						height: 36rpx;
						font-size: 24rpx;
						font-family: Source Han Sans SC-Medium, Source Han Sans SC;
						font-weight: 500;
						color: #001B0A;
					}
					span{
						width: 38rpx;
						height: 36rpx;
						font-size: 24rpx;
						font-family: Source Han Sans SC-Medium, Source Han Sans SC;
						font-weight: 500;
						color: #AAAAAA;
						margin-left: 65rpx;
					}
				}
				
			}
			
		}
		.footer{
				// position: absolute;
				margin-top: -30rpx;
				margin-left: 400rpx;
				width: 196rpx;
				height: 48rpx;
				font-size: 28rpx;
				font-family: Source Han Sans SC-Bold, Source Han Sans SC;
				font-weight: bold;
				color: #000000;
				line-height: 48rpx;
			}
		.bottom{
			display: flex;
			// position: absolute;
			bottom: 32rpx;
			// float: right;
			margin-left: 200rpx;
			.left{
				width: 176rpx;
				height: 64rpx;
				border-radius: 44rpx 44rpx 44rpx 44rpx;
				border: 2rpx solid #EEEEEE;
				font-size: 28rpx;
				font-family: Source Han Sans SC-Regular, Source Han Sans SC;
				font-weight: 400;
				color: #001B0A;
				line-height: 64rpx;
				text-align: center;
				margin-right: 32rpx;
			}
			.right{
				width: 176rpx;
				height: 64rpx;
				border-radius: 44rpx 44rpx 44rpx 44rpx;
				border: 2rpx solid #E23434;
				font-size: 28rpx;
				font-family: Source Han Sans SC-Regular, Source Han Sans SC;
				font-weight: 400;
				color: #E23434;
				line-height: 64rpx;
				text-align: center;
			}
		}
	}
}
</style>
